<?php 


/** 
***************************************************
*欢迎使用免费版xSite企业自助建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.php.net.cn/xsite/ 
***************************************************
**/




 header("Cache-Control: no-cache, must-revalidate"); $action = strip_tags(empty($_GET['action']) ? empty($_POST['action']) ? '' : $_POST['action'] : $_GET['action']); if ($action == 'captcha') { header("Content-type: image/jpeg"); } else { header("Content-type: text/html;charset=utf-8"); } require_once "php.net.cn/xsite/include/common.inc.php"; require_once SITE_ROOT . "/include/360_safe3.php"; $setting = cache_read("setting"); extract($setting); if ($action == 'captcha') { session_save_path(SITE_ROOT . "/data/log"); session_set_cookie_params(time() + 3600); session_name('siteteam'); require_once SITE_ROOT . "/include/Captcha.php"; $cap_config['width'] = '100'; $cap_config['height'] = '40'; $cap_config['characters'] = '4'; $cap_config['fontpath'] = SITE_DIR .'/templates/default/font/elephant.ttf'; $cap = new Captcha(); $cap->create_captchaImage($cap_config['fontpath'], $cap_config['width'] , $cap_config['height'], $cap_config['characters']); } if ($action == 'guestbook') { if (empty($_POST['postSubmit'])) { ob_start(); echo (ob_get_clean()); } else { require_once SITE_ROOT . "/include/mail.inc.php"; $email_message = "\r\n---------------------------------------------------------\r\n留言内容："; $email_message .= "\r\n" . @strip_tags($_POST['content']); $email_message .= "\r\n\r\n电话：\r\n" . @strip_tags($_POST['tel']); $email_message .= "\r\n\r\n邮件：\r\n" . @strip_tags($_POST['email']); $email_message .= "\r\n\r\n即时通讯：\r\n" . @strip_tags($_POST['im']); $email_message .= "\r\n\r\n联系地址：\r\n" . @strip_tags($_POST['address']); $email_message .= "\r\n\r\n其它信息：\r\nIP[" . remote_ip() . "],TIME[" . date("Y-m-d H:i:s", time()) . "]"; $email_message .= "\r\n---------------------------------------------------------"; $email_message .= "\r\n{$company_name}"; $email_from = ""; $target_email = empty($company_email) ? "28693177@qq.com" : $company_email; @send_mail($company_name, $target_email, "来自[{$site_title}]的留言", strip_tags($email_message), '客户邮件', $_POST['email']); @send_mail('你好', trim($_POST['email']), "欢迎你在在 [ {$site_title} ] 上留言,我们尽快处理!", @strip_tags($_POST['content']), $company_name, $target_email); ob_start(); echo (ob_get_clean()); } } if ($action == 'saveform') { require_once SITE_ROOT . "/include/mail.inc.php"; $email_message = "\r\n客户提交内容：\r\n---------------------------------------------------------\r\n"; if (is_array($_POST['data']) && count($_POST['data'])) { foreach ($_POST['data'] as $k => $v) { if (is_array($_POST['validate']) && array_key_exists($k, $_POST['validate']) ) { if (!empty($_POST['validate'][$k])) { if (empty($v) || $v == '') { echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body> [' . $k . ']温馨提示： ' . strip_tags($_POST['validate'][$k]) . '  <a href="javascript:history.back();">返回>> </a></body></html>'; exit(); } } } if (empty($v) || $v == '') { $v = '...............'; } $email_message .= "\r\n{$k} ： " . @strip_tags($v) . "\r\n"; } } $email_message .= "\r\n\r\n其它信息：\r\nIP[" . remote_ip() . "],TIME[" . date("Y-m-d H:i:s", time()) . "]"; $email_message .= "\r\n---------------------------------------------------------"; $email_message .= "\r\n{$company_name}"; $email_from = ""; $target_email = empty($company_email) ? "28693177@qq.com" : $company_email; @send_mail($company_name, $target_email, "来自[{$site_title}]的留言", strip_tags($email_message), '消息邮件', 'dev@siteteam.cn'); if (isset($_POST['return_url']) && $_POST['return_url'] !== '') { header("Location: {$_POST['return_url']}"); } else { echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body><a href="http://' . $site_url . '">你的信息我们已经收到，请点击返回 >> </a></body></html>'; } } if ($action == "fileinfo") { if (file_exists('xsite.zip')) { echo @filesize('xsite.zip'); } else { echo '0'; } } ?>